home *** CD-ROM | disk | FTP | other *** search
/ Agent Central Host Computer / Agent - Central Host Computer.iso / _SETUP.1 / vcboxcycle.sql < prev    next >
Text File  |  2000-05-12  |  1KB  |  58 lines

  1. /*
  2. forms a union of the 4 types of actions for a cashbox: insert, probe, remove, count
  3. in the report they are arranged by date and time.
  4. */
  5. create or replace view vcboxcycle as
  6. select 'Insert           ' type, 1 rectype, 
  7.     cbinsert.conv_date, 
  8.     cbinsert.cashbox_glid cbox, 
  9.     cbinsert.farebox_glid fbox, 
  10.     sysdate probe_insert, 
  11.     '   ' flag,  
  12.     ' ' pull , 
  13.     0  probedcash, 
  14.     0 totalcash, 
  15.     0     total, 
  16.     sysdate systemdate
  17. from cbinsert
  18. union
  19. select '        Remove   ', 3 rectype, 
  20.     cbremov.conv_date, 
  21.     cbremov.cashbox_glid cbox, 
  22.     cbremov.farebox_glid fbox, 
  23.     sysdate probe_insert,     
  24.     '   ' flag, 
  25.     ' ' pull , 
  26.     0 probedcash, 
  27.     0 totalcash, 
  28.     0 total, 
  29.     sysdate systemdate
  30. from cbremov
  31. union
  32. select '    Probe        ', 2 rectype, pdate,  
  33.     cashbox_glid cbox, 
  34.     farebox_glid fbox,
  35.     insert_date,  
  36.     '<-----' flag, 
  37.     decode(pull, 1, 'Yes', 'No ') pull , 
  38.     probedcash, 
  39.     totalcash, 
  40.     0 total, 
  41.     sysdate systemdate
  42. from vbusprobe50
  43. union
  44. select '            Count', 4 rectype, 
  45.     count_date, 
  46.     cashbox_glid cbox, 
  47.     -1 fbox, 
  48.     sysdate probe_insert, 
  49.     '----->' flag, 
  50.     ' ' pull , 
  51.     0 probedcash, 
  52.     0 totalcash, 
  53.     total, 
  54.     sysdate systemdate
  55. from vcbcount;
  56.  
  57.  
  58.